package com.prp.dao;

/**
 * AdminroleId entity. @author MyEclipse Persistence Tools
 */

public class AdminroleId implements java.io.Serializable {

	// Fields

	private Role role;
	private Userinfo userinfo;

	// Constructors

	/** default constructor */
	public AdminroleId() {
	}

	/** full constructor */
	public AdminroleId(Role role, Userinfo userinfo) {
		this.role = role;
		this.userinfo = userinfo;
	}

	// Property accessors

	public Role getRole() {
		return this.role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public Userinfo getUserinfo() {
		return this.userinfo;
	}

	public void setUserinfo(Userinfo userinfo) {
		this.userinfo = userinfo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AdminroleId))
			return false;
		AdminroleId castOther = (AdminroleId) other;

		return ((this.getRole() == castOther.getRole()) || (this.getRole() != null
				&& castOther.getRole() != null && this.getRole().equals(
				castOther.getRole())))
				&& ((this.getUserinfo() == castOther.getUserinfo()) || (this
						.getUserinfo() != null
						&& castOther.getUserinfo() != null && this
						.getUserinfo().equals(castOther.getUserinfo())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getRole() == null ? 0 : this.getRole().hashCode());
		result = 37 * result
				+ (getUserinfo() == null ? 0 : this.getUserinfo().hashCode());
		return result;
	}

}